#include "objects.h"
//rever paredes!!!!!
void drawFloor(float length, float width,float height) {
    glPushAttrib(GL_CURRENT_BIT);
	glPushMatrix();
    drawPlano(length,0,height,1);
	drawPlano(length,0,height,0);
    glPopMatrix();    
	 glPopAttrib();
}
void drawTOP(float length, float width,float height) {
    glPushAttrib(GL_CURRENT_BIT);
	glPushMatrix();
	glColor3f(0, 1, 1);
    drawPlano(length, width*2,height,1);
	drawPlano(length, width*2,height,0);
    glPopMatrix();    
	 glPopAttrib();
}
void drawRightWall(float length, float width,float height) {
    glPushAttrib(GL_CURRENT_BIT);
		glPushMatrix();
		glTranslatef(0, height, 0); 
		glColor3f(0, 1, 0);
		glTranslatef(0, 0, 0);
		glRotatef(-90, 0, 0, 1);
		drawPlano(length,width,height, 1);
		glColor3f(0, 1, 0);
		drawPlano(length,width,height, 0);
	glPopMatrix();
	 glPopAttrib();
}
void drawBackWall(float length, float width,float height) {
	  glPushAttrib(GL_CURRENT_BIT);
	  glPushMatrix();
	  glTranslatef(0, width, 0); 
	  glColor3f(1, 0, 0);
	  glTranslatef(-length*2, 0, 0);
	  glRotatef(-90, 0, 0, 1);
	  drawPlano(length,width,height,1);
	  drawPlano(length,width,height,0);
	  glPopMatrix(); 
	   glPopAttrib();
}
void drawFrontWall(float length, float width,float height) {
   glPushAttrib(GL_CURRENT_BIT); 
    glPushMatrix();
    glTranslatef(0, height, 0);
    glColor3f(1, 0, 1);
    glTranslatef(0, 0,2*-length);
    glRotatef(90, 1, 0, 0);
    drawPlano(length,width,height,1);
	drawPlano(length,width,height,0);
    glPopMatrix();
	glPopAttrib();
 
}
void drawLeftWall(float length, float width,float height) {
    glPushAttrib(GL_CURRENT_BIT);
    glPushMatrix();
    glTranslatef(0, height, 0);
    glColor3f(1, 0.5, .5);
    glTranslatef(0, 0, 0);
    glRotatef(90, 1, 0, 0);
    drawPlano(length,width,height,0);
	drawPlano(length,width,height,1);
    glPopMatrix();
    glPopAttrib();  
}


void drawBanquinho(float tamanho){
	glPushMatrix();

	
	// dimensoes relativas ao parametro tamanho (tamanho = aresta da base do banco quadrado)
	float base_h =0.35*tamanho; // altura da base da cadeira
	float perna_r =0.25*tamanho; // tamanho da aresta da perna (grossura da perna)
	float perna_o = tamanho-(perna_r/2.0); // localizacao da perna na base do banco ( distancia da origem )
	float ref_perna = (4.0/3.0)*tamanho; // deslocamento em y para o referencial da perna (antes de mudar a escala)
	float escala =(2*tamanho/perna_r); // factor de escala


	// perna xz
	glPushMatrix();
	glTranslatef(perna_o, ref_perna, perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();

	// perna -xz
	glPushMatrix();
	glTranslatef(-perna_o,ref_perna,perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();
	// perna x-z
	glPushMatrix();
	glTranslatef(perna_o,ref_perna,-perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();
	// perna -x-z
	glPushMatrix();
	glTranslatef(-perna_o,ref_perna,-perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();

	glPushMatrix();
	glTranslatef(0,2.5*ref_perna,0);
	glScalef(5,1,5);
	drawcubo(base_h);
	glPopMatrix();

}
void drawCadeiraBasica(float tamanho){
		glPushMatrix();

	// dimensoes relativas ao parametro tamanho (tamanho = aresta da base do banco quadrado)
	float base_h =0.35*tamanho; // altura da base da cadeira
	float perna_r =0.25*tamanho; // tamanho da aresta da perna (grossura da perna)
	float perna_o = tamanho-(perna_r/2.0); // localizacao da perna na base do banco ( distancia da origem )
	float ref_perna = (4.0/3.0)*tamanho; // deslocamento em y para o referencial da perna (antes de mudar a escala)
	float escala =(2*tamanho/perna_r); // factor de escala


	// perna xz
	glPushMatrix();
	glTranslatef(perna_o, ref_perna, perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();

	// perna -xz
	glPushMatrix();
	glTranslatef(-perna_o,ref_perna,perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();
	// perna x-z
	glPushMatrix();
	glTranslatef(perna_o,ref_perna,-perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();
	// perna -x-z
	glPushMatrix();
	glTranslatef(-perna_o,ref_perna,-perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();

	glPushMatrix();
	glTranslatef(0,2.5*ref_perna,0);
	glScalef(5,1,5);
	drawcubo(base_h);
	glPopMatrix();

	glPushMatrix();
	glTranslatef(0,4*ref_perna,-perna_o*2);
	glRotatef(-100,1,0,0);
	glScalef(5,1,5);
	drawcubo(base_h);
	glPopMatrix();
}
void drawCadeira(float tamanho){
	glPushMatrix();

	// dimensoes relativas ao parametro tamanho (tamanho = aresta da base do banco quadrado)
	float base_h =0.35*tamanho; // altura da base da cadeira
	float perna_r =0.25*tamanho; // tamanho da aresta da perna (grossura da perna)
	float perna_o = tamanho-(perna_r/2.0); // localizacao da perna na base do banco ( distancia da origem )
	float ref_perna = (4.0/3.0)*tamanho; // deslocamento em y para o referencial da perna (antes de mudar a escala)
	float escala =(2*tamanho/perna_r); // factor de escala


	// perna xz
	glPushMatrix();
	glTranslatef(perna_o, ref_perna, perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();

	// perna -xz
	glPushMatrix();
	glTranslatef(-perna_o,ref_perna,perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();
	// perna x-z
	glPushMatrix();
	glTranslatef(perna_o,ref_perna,-perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();
	// perna -x-z
	glPushMatrix();
	glTranslatef(-perna_o,ref_perna,-perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();

	glPushMatrix();
	glTranslatef(0,2.5*ref_perna,0);
	glScalef(5,1,5);
	drawcubo(base_h);
	glPopMatrix();

	//encosto
	glPushMatrix();
	glTranslatef(0,5*ref_perna,-perna_o*2);
	glRotatef(-100,1,0,0);
	glScalef(5,1,5);
	drawcubo(base_h);
	glPopMatrix();


	//uniao
	glPushMatrix();
	glTranslatef(-8,3.5*ref_perna,-perna_o*2);
	glScalef(1,10,1);
	drawcubo(5);
	glTranslatef(0.5*perna_o,0,0);
	drawcubo(5);
	glPopMatrix();

	glPopMatrix(); // end rotate


	glPopMatrix(); // fim
}
void drawMesaNormal(float tamanho){
	glPushMatrix();
	
	// dimensoes relativas ao parametro tamanho (tamanho = aresta da base do banco quadrado)
	float base_h =0.35*tamanho; // altura da base da mesa
	float perna_r =0.5*tamanho; // tamanho da aresta da perna (grossura da perna)
	float perna_o = tamanho*2.3; // localizacao da perna na base do banco ( distancia da origem )
	float ref_perna = (4.0/3.0)*tamanho; // deslocamento em y para o referencial da perna (antes de mudar a escala)
	float escala =(2*tamanho/perna_r); // factor de escala


	// perna xz
	glPushMatrix();
	glTranslatef(perna_o, ref_perna, perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();

	// perna -xz
	glPushMatrix();
	glTranslatef(-perna_o,ref_perna,perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();
	// perna x-z
	glPushMatrix();
	glTranslatef(perna_o,ref_perna,-perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();
	// perna -x-z
	glPushMatrix();
	glTranslatef(-perna_o,ref_perna,-perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();

	//tampo
	glPushMatrix();
	glTranslatef(0,2.5*ref_perna,0);
	glScalef(2*escala,1,2*escala);
	drawcubo(base_h);
	glPopMatrix();
}
void drawMesaSpecial(float tamanho){
	glPushMatrix();
	
	// dimensoes relativas ao parametro tamanho (tamanho = aresta da base do banco quadrado)
	float base_h =0.5*tamanho; // altura da base da mesa
	float perna_r =0.3*tamanho; // tamanho da aresta da perna (grossura da perna)
	float perna_o = tamanho*(2); // localizacao da perna na base do banco ( distancia da origem )
	float ref_perna = (4.0/3.0)*tamanho; // deslocamento em y para o referencial da perna (antes de mudar a escala)
	float escala =(2*tamanho/perna_r); // factor de escala


	// perna xz
	glPushMatrix();
	glTranslatef(perna_o, ref_perna, perna_o);
	glScalef(1,escala/2,1);
	drawcubo(perna_r);
	glPopMatrix();
	//esferauniao
	glPushMatrix();
	glTranslatef(perna_o, ref_perna*2, perna_o);
	drawEsfera(perna_r+1,20,20);
	glPopMatrix();
		

	// perna -xz
	glPushMatrix();
	glTranslatef(-perna_o,ref_perna,perna_o);
	glScalef(1,escala/2,1);
	drawcubo(perna_r);
	glPopMatrix();
	//esferauniao
	glPushMatrix();
	glTranslatef(-perna_o, ref_perna*2, perna_o);
	drawEsfera(perna_r+1,20,20);
	glPopMatrix();

	// perna x-z
	glPushMatrix();
	glTranslatef(perna_o,ref_perna,-perna_o);
	glScalef(1,escala/2,1);
	drawcubo(perna_r);
	glPopMatrix();
	//esferauniao
	glPushMatrix();
	glTranslatef(perna_o, ref_perna*2,-perna_o);
	drawEsfera(perna_r+1,20,20);
	glPopMatrix();

	// perna -x-z
	glPushMatrix();
	glTranslatef(-perna_o,ref_perna,-perna_o);
	glScalef(1,escala/2,1);
	drawcubo(perna_r);
	glPopMatrix();
	//esferauniao
	glPushMatrix();
	glTranslatef(-perna_o, ref_perna*2, -perna_o);
	drawEsfera(perna_r+1,20,20);
	glPopMatrix();

	//tampo
	glPushMatrix();
	glTranslatef(0,2.5*ref_perna,0);
	glScalef(escala,1,escala);
	drawcubo(base_h);
	glPopMatrix();
}

void drawMesaRedonda(float tamanho){
glPushMatrix();
	
	// dimensoes relativas ao parametro tamanho (tamanho = aresta da base do banco quadrado)
	float base_h =0.35*tamanho; // altura da base da mesa
	float perna_r =0.5*tamanho; // tamanho da aresta da perna (grossura da perna)
	float perna_o = tamanho*2.3; // localizacao da perna na base do banco ( distancia da origem )
	float ref_perna = (4.0/3.0)*tamanho; // deslocamento em y para o referencial da perna (antes de mudar a escala)
	float escala =(2*tamanho/perna_r); // factor de escala


	// perna xz
	glPushMatrix();
	glTranslatef(perna_o, ref_perna, perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();

	// perna -xz
	glPushMatrix();
	glTranslatef(-perna_o,ref_perna,perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();
	// perna x-z
	glPushMatrix();
	glTranslatef(perna_o,ref_perna,-perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();
	// perna -x-z
	glPushMatrix();
	glTranslatef(-perna_o,ref_perna,-perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();

	//tampo
	glPushMatrix();
	glTranslatef(0,2.5*ref_perna,0);
	glScalef(25*escala,1,25*escala);
	drawCilindro(1,1,100);
	glPopMatrix();
}
// REVER //REVER
void drawBanqinhoSpecial(float tamanho){
	glPushMatrix();
	
	// dimensoes relativas ao parametro tamanho (tamanho = aresta da base do banco quadrado)
	float base_h =0.35*tamanho; // altura da base da mesa
	float perna_r =0.3*tamanho; // tamanho da aresta da perna (grossura da perna)
	float perna_o = tamanho*(2.3-(tamanho*0.1)); // localizacao da perna na base do banco ( distancia da origem )
	float ref_perna = (4.0/3.0)*tamanho; // deslocamento em y para o referencial da perna (antes de mudar a escala)
	float escala =(2*tamanho/perna_r); // factor de escala


	// perna xz
	glPushMatrix();
	glTranslatef(perna_o, ref_perna, perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();

	// perna -xz
	glPushMatrix();
	glTranslatef(-perna_o,ref_perna,perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();
	// perna x-z
	glPushMatrix();
	glTranslatef(perna_o,ref_perna,-perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();
	// perna -x-z
	glPushMatrix();
	glTranslatef(-perna_o,ref_perna,-perna_o);
	glScalef(1,escala,1);
	drawcubo(perna_r);
	glPopMatrix();

	//tampo
	glPushMatrix();
	glTranslatef(0,2.5*ref_perna,0);
	glScalef(escala,1,escala);
	drawcubo(base_h);
	glPopMatrix();
}


void drawCandeeiro(float tamanho){
	glPushMatrix();

	drawFloor(tamanho,tamanho,tamanho);
	drawBackWall(tamanho,tamanho,tamanho);
	drawRightWall(tamanho,tamanho,tamanho);
	drawLeftWall(tamanho,tamanho,tamanho);
	drawFrontWall(tamanho,tamanho,tamanho);
	glTranslatef(0,-20,0);
	drawFloor(tamanho,tamanho,tamanho);
	glTranslatef(0,+15,0);
	glScalef(1,15,1);
	drawCilindro(1,1,40);
	glPopMatrix();
	glPushMatrix();
	glTranslatef(0,10,0);
	drawEsfera(5,20,20);
	glTranslatef(0,-15,0);
	drawEsfera(5,20,20);
	glPopMatrix();
	glPopMatrix();
}


//por acabar!
void garrafa(float tamanho){
  tamanho = tamanho/2;
  glPushMatrix();

  glPushMatrix();
  glTranslatef(0,tamanho/2,0);
  glScalef(1,1,0.5);
  drawcubo(tamanho); //corpo da garrafa
  glPopMatrix();

  glPushMatrix();
  glTranslatef(tamanho/1.1,tamanho/2,0);
  glScalef(tamanho/1.5,tamanho,tamanho/2);
  drawCilindro(1,1,50); //lateral 1 da garrafa
  glPopMatrix();
  
  glPushMatrix();
  glTranslatef(-tamanho/1.1,tamanho/2,0);
  glScalef(tamanho/1.5,tamanho,tamanho/2);
  drawCilindro(1,1,50); //lateral 2 da garrafa
  glPopMatrix();
  //
  //glPushMatrix();
  //glTranslatef(tamanho/2,tamanho,0);
  //drawEsfera(1,50,0); //topo esferico 1
  //glPopMatrix();
  //
  //glPushMatrix();
  //glTranslatef(-tamanho/2,tamanho,0);
  //drawEsfera(tamanho/4,50,0); //topo esferico 2
  //glPopMatrix();

  //glPushMatrix();
  //glTranslatef(0,tamanho,0);
  //glRotatef(90,0,0,1);
  //drawCilindro(tamanho/4,tamanho,50); //topo da garrafa
  //glPopMatrix();

  //glPushMatrix();
  //glTranslatef(0,tamanho*1.25,0);
  //drawCilindro(tamanho/8,tamanho/2,50); //gargalo
  //glPopMatrix();

  //glPushMatrix();
  //glTranslatef(0,tamanho*1.5,0);
  //drawCilindro(tamanho/6,tamanho/8,50); //rolha
  //glPopMatrix();

  glPopMatrix();
}



void copoSumo(float tamanho){
	 
	//Cilindro Aberto,copo simples
	glScalef(10,10,10);
	drawCilindroBase1(1,1,tamanho);

	glPushMatrix();
	glTranslatef(0,-1.5,0);
	glScalef(1,0.5,1);
	drawCilindro(1,1,tamanho);
	glPopMatrix();
	


}

void copoChampanhe(float tamanho){
	 
	//Cilindro Aberto,copo simples
	glScalef(10,10,10);
	drawCilindroBase1(1,1,tamanho);
	glPushMatrix();
	glTranslatef(0,-1,0);
	glScalef(1,1,1);
	drawEsfera(1,tamanho,tamanho); //lateral 1 da garrafa


	glPushMatrix();
	glTranslatef(0,-3,0);
	glScalef(1,2,1);
	drawCilindro(0.1,1,tamanho);
	glPopMatrix();

	glPushMatrix();
	glTranslatef(0,-6,0);
	glScalef(1,0.1,1);
	drawCilindro(1,1,tamanho);
	glPopMatrix();
	


}

void copoVinho (){

int yin = -46;
int yin1 = -98;
int rad = 4;


for(int i=0;i<90;i++){
	glRotatef(4, 0.0f, 1.0f, 0.0f);
for(int j=0;j<90;j++){
	if(j<57){
		glRotatef(4, 0.0f, 0.0f, 1.0f);
		glColor3f (1.0, 0.0, 1.0);
		glBegin(GL_POINTS);

		
		glVertex3f( -40.0,20.0,0.0);
		
		glEnd();
	}
	else
	{
		glRotatef(4, 0.0f, 0.0f, 1.0f);
		glColor3f (0.0, 0.0, 0.0);
		glBegin(GL_POINTS);

		
		glVertex3f( -40.0,20.0,0.0);
		
		glEnd();
	}
}
}

for(int o=0;o<27;o++){

for(int p=0;p<45;p++){
		
		glRotatef(8, 0.0f, 1.0f, 0.0f);
		glColor3f (1.0, 0.0, 1.0);
		glBegin(GL_POINTS);

		
		glVertex3f( 4.5,yin,0.0);
		
		glEnd();
}
	yin = yin - 2;
}

for(int k=0;k<10;k++){
for(int l=0;l<360;l++){
		glRotatef(1, 0.0f, 1.0f, 0.0f);
		glColor3f (1.0, 0.0, 1.0);
		glBegin(GL_POINTS);
		glVertex3f( rad,yin1,0.0);
		glEnd();
}
	rad = rad + 2;
	yin1 = yin1 - 2;
}
	glPopMatrix();
}

void copoCocktail(){

int rad = 60;
int Zin = 60;
int rad1 = 4;
int Zin1 = 4;
int rad2 = 0;
int Zin2 = -36;

for(int i=0;i<30;i++){

for(int j=0;j<360;j++){
		
		glRotatef(1, 0.0f, 0.0f, 1.0f);
		glColor3f (0.50, 0.50, 0.50);
		glBegin(GL_POINTS);

		
		glVertex3f( rad,0.0,Zin);
		
		glEnd();

}
	rad = rad - 2;
	
	Zin = Zin - 2;
	
}

for(int o=0;o<21;o++){

for(int p=0;p<360;p++){
		
		glRotatef(1, 0.0f, 0.0f, 1.0f);
		glColor3f (0.50, 0.50, 0.50);
		glBegin(GL_POINTS);

		
		glVertex3f( rad1,0.0,Zin1);
		
		glEnd();

}
	//rad = rad - 2;
	
	Zin1 = Zin1 - 2;
	
}

for(int q=0;q<360;q++){
		
		glRotatef(15, 0.0f, 0.0f, 1.0f);
		glColor3f (0.50, 0.50, 0.50);
		glBegin(GL_LINES);

		glVertex3f( 4.0,0.0,4.0);
		glVertex3f( 4.0,0.0,-38.0);
		
		glEnd();

}

for(int k=0;k<10;k++){

for(int l=0;l<360;l++){
		
		glRotatef(1, 0.0f, 0.0f, 1.0f);
		glColor3f (0.50, 0.50, 0.50);
		glBegin(GL_POINTS);

		
		glVertex3f( rad2,0.0,Zin2);
		
		glEnd();

}
	rad2 = rad2 + 2;
	
	Zin2 = Zin2 - 2;
	
}


for(int m=0;m<360;m++){
		
		glRotatef(15, 0.0f, 0.0f, 1.0f);
		glColor3f (0.50, 0.50, 0.50);
		glBegin(GL_LINES);

		glVertex3f( 0.0,0.0,0.0);
		glVertex3f( 60,0.0,60);
		
		glEnd();

}

for(int n=0;n<360;n++){
		
		glRotatef(15, 0.0f, 0.0f, 1.0f);
		glColor3f (0.50, 0.50, 0.50);
		glBegin(GL_LINES);

		glVertex3f( 0.0,0.0,-34);
		glVertex3f( 18.0,0.0,-54.0);
		
		glEnd();

}

glTranslatef(60.0,0.0,60.0);
for(int r=0;r<10;r++){

for(int s=0;s<360;s++){
		
		glRotatef(1, 0.0f, 1.0f, 0.0f);
		glColor3f (1.0, 1.0, 0.0);
		glBegin(GL_POINTS);

		
		glVertex3f( 0.0,0.0,20.0);
		
		glEnd();

}

for(int t=0;t<360;t++){
		
		glRotatef(1, 0.0f, 1.0f, 0.0f);
		glColor3f (1.0, 1.0, 0.0);
		glBegin(GL_POINTS);

		
		glVertex3f( 0.0,0.0,23.0);
		
		glEnd();

}	

for(int u=0;u<360;u++){
		
		glRotatef(1, 0.0f, 1.0f, 0.0f);
		glColor3f (1.0, 1.0, 0.0);
		glBegin(GL_POINTS);

		
		glVertex3f( 0.0,0.0,2.0);
		
		glEnd();

}

for(int v=0;v<360;v++){
		
		glRotatef(45, 0.0f, 1.0f, 0.0f);
		glColor3f (1.0, 1.0, 1.0);
		glBegin(GL_LINES);

		glVertex3f( 0.0,0.0,2.0);
		glVertex3f( 0.0,0.0,20.0);
		
		glEnd();

}		
	


for(int s1=0;s1<360;s1++){
		
		glRotatef(1, 0.0f, 1.0f, 0.0f);
		glColor3f (1.0, 1.0, 0.0);
		glBegin(GL_POINTS);

		
		glVertex3f( 0.0,2.0,20.0);
		
		glEnd();

}

for(int t1=0;t1<360;t1++){
		
		glRotatef(1, 0.0f, 1.0f, 0.0f);
		glColor3f (1.0, 1.0, 0.0);
		glBegin(GL_POINTS);

		
		glVertex3f( 0.0,2.0,23.0);
		
		glEnd();

}	

for(int u1=0;u1<360;u1++){
		
		glRotatef(1, 0.0f, 1.0f, 0.0f);
		glColor3f (1.0, 1.0, 0.0);
		glBegin(GL_POINTS);

		
		glVertex3f( 0.0,2.0,2.0);
		
		glEnd();

}

for(int v1=0;v1<360;v1++){
		
		glRotatef(45, 0.0f, 1.0f, 0.0f);
		glColor3f (1.0, 1.0, 1.0);
		glBegin(GL_LINES);

		glVertex3f( 0.0,2.0,2.0);
		glVertex3f( 0.0,2.0,20.0);
		
		glEnd();

}

for(int v2=0;v2<360;v2++){
		
		glRotatef(10, 0.0f, 1.0f, 0.0f);
		glColor3f (1.0, 1.0, 0.0);
		glBegin(GL_LINES);

		glVertex3f( 0.0,2.0,20.0);
		glVertex3f( 0.0,0.0,20.0);
		
		glEnd();

}				
	
for(int v3=0;v3<360;v3++){
		
		glRotatef(10, 0.0f, 1.0f, 0.0f);
		glColor3f (1.0, 1.0, 0.0);
		glBegin(GL_LINES);

		glVertex3f( 0.0,2.0,23.0);
		glVertex3f( 0.0,0.0,23.0);
		
		glEnd();

}	

for(int v4=0;v4<360;v4++){
		
		glRotatef(10, 0.0f, 1.0f, 0.0f);
		glColor3f (1.0, 1.0, 0.0);
		glBegin(GL_LINES);

		glVertex3f( 0.0,2.0,2.0);
		glVertex3f( 0.0,0.0,2.0);
		
		glEnd();

}
}
}